GXReadPrintFilePage
You can use theGXReadPrintFilePage
function to retrieve a page or page format for a print file object.
void GXReadPrintFilePage (gxPrintFile aPrintFile, long pageNumber, long numViewPorts, gxViewPort *viewPortList, gxFormat *pageFormat, gxShape *pageShape);
aPrintFile
A reference to the print file object whose file you want to access.pageNumber
The page you want to access.- numViewPorts
The number of view ports in the view port list.- viewPortList
A pointer to a list of references to view ports through which you want the page's picture shape to draw.pageFormat
On return, a reference to the format object associated with the page.pageShape
- On return, a reference to the picture shape that contains the page's data.
DESCRIPTION
TheGXReadPrintFilePage
function retrieves the print file object's page that you specify in thepageNumber
parameter. It returns the page format and a picture shape representing the contents of the page in thepageFormat
andpageShape
parameters, respectively. You can set one or both of these parameters tonil
if you do not want them returned.The page shape is associated with the view ports in the viewPortList list parameter, which is the list of view ports you want the shape to be drawn through when you call
GXDrawShape
for the shape in thepageShape
parameter. The numViewPorts parameter specifies how many view ports are in the list.SPECIAL CONSIDERATIONS
Do not change the page format or page shape, pointed to by the pageFormat and pageShape parameters, directly. If you want to change the format or shape, make a copy of the format or shape and modify the copy. After you make a change to the copy, you can replace the format or page in the print file with your copy or insert your copy into the print file.For speed and memory efficiency, dispose of the references to the format and page shape objects as soon as they are no longer needed. For example, dispose of them as soon as you make a copy of them or draw a page with them.
The page number specified in the
pageNumber
parameter must be valid. Call theGXCountPrintFilePage
s function to ensure that the page number is valid.RESULT CODES
gxSegmentLoadFailedErr A required code segment could not be found, or there was not enough memory to load it. SEE ALSO
For an example that uses theGXReadPrintFilePage
function, see "Reading Print File Data" on page 4-30.
Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help